
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace StudentVideo.Data.Entities;

/// <summary>
/// 专业
/// </summary>
[Table("major")]
public class MajorEntity: BaseEntity {

   /// <summary>
   /// 名称
   /// </summary>
   [Required]
   [MaxLength(50)]
   public required string Name { get; set; }

   /// <summary>
   /// 编码
   /// </summary>
   [Required]
   [MaxLength(50)]
   public required string Code { get; set; }

   /// <summary>
   /// 激活状态
   /// </summary>
   public bool Enable { get; set; } = true;

   //导航属性
   [InverseProperty(nameof(MajorCourseMapEntity.Major))]
   public ICollection<MajorCourseMapEntity>? MajorCourseMaps { get; set; }
}
